<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/common/taglibs.jsp"%>
<link rel="stylesheet" type="text/css" href="${ctx}/styles/pop.css" media="screen"/>
<script type="text/javascript" src="${ctx}/scripts/jquery/jquery.form.js"></script>
<div class="pop_roster_request">
	<div class="pop_roster_request_tit">
		<c:choose>
			<c:when test="${not empty rosterGroup.groupid && rosterGroup.groupid > 0}">
				修改好友组,组名不能重复
			</c:when>
			<c:otherwise>
				创建好友组,组名不能重复
			</c:otherwise>
		</c:choose>
	</div>
	<form id="f_group_save" action="<c:url value='/roster/savegroup.do'/>" method="post">
		<input type="hidden" name="rosterGroup.groupid" value="${rosterGroup.groupid}">
		<input type="hidden" name="rosterGroup.rank" value="${rosterGroup.rank}">
		组名：<input type="text" name="rosterGroup.name" value="${rosterGroup.name}">
		<br/>
		<input type="submit" class="btn3" value="创建">
	</form>
</div>
<script>
$("#f_group_save").ajaxForm({
	success: processSaveGroupResult
});
function processSaveGroupResult(result){
	if($(result).find('result').text().toUpperCase().indexOf("TRUE") >= 0){
		$.fn.colorbox.close();
		alert("创建成功！");
	}else{
		$.fn.colorbox.close();
	}
	$("#space_owner_tabs" ).tabs("load", 1);
}
</script>